package com.virus.mall.dao;

import com.virus.mall.model.Comments;
import com.virus.mall.model.Orders;
import com.virus.mall.model.Spec;
import com.virus.mall.model.bo.OrdersByPageBo;
import com.virus.mall.model.vo.OrdersVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Classname OrdersDao
 * @Description NULL
 * @Date 2021/4/19 14:16
 * @Created by virus
 */
public interface OrdersDao {

    Integer selectTotal(Orders orders);

    List<OrdersVo> orderByPage(Orders orders);

    Orders order(Integer id);

    Integer changeOrder(Orders orders);

    Spec selectSpec(Integer spec);

    Integer deleteOrder(Integer id);

    List<OrdersVo> orders(Integer state);

    Integer addOrder(Orders orders);

    List<Orders> getOrderByState(@Param("userId") Integer userId,@Param("state") Integer state);

    Integer settleAccounts(List<Orders> ordersList);

    Integer pay(Integer id);

    Integer confirmReceive(Integer id);

    Integer sendComment(Comments comments);

    Integer selectSpecIdByOrderId(Integer id);
}
